import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/components/home/Home'
import Login from '@/components/login/Login'
import ForgetPwd from '@/components/login/ForgetPwd'
import Register from '@/components/login/Register'
import UserCenter from '@/components/user/UserCenter'

import Subject from '@/components/course/Subject'
import CourseList from '@/components/course/CourseList'

Vue.use(VueRouter)

const routes = [
    {path: '/', name: 'Home', component: Home},
    {path: '/login', name: 'Login', component: Login},
    {path: '/forgetPwd', name: 'ForgetPwd', component: ForgetPwd},
    {path: '/register', name: 'Register', component: Register},
    {path: '/userCenter', name: 'UserCenter', component: UserCenter},
    {path: '/subject', name: 'Subject', component: Subject},
    {path: '/courseList', name: 'CourseList', component: CourseList},
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
